﻿
using ZR.Model.Models.ProductionControl;

namespace CKS.PLC.Core
{
    public interface IPlcClient
    {
        PlcConfig PlcInfo { get; set; }

        bool IsConnected {  get; set; }
        bool IsOnline { get; set; }

        Task ConnectPlc(CancellationToken cancellation);
        void DoHeart();
        Task Execute(CancellationToken cancellation);
        Task ExecuteMain();
        void ExecuteSubscriptionAction(DecodeValue value);
        void ProccessPointValue(DecodeValue value);
        int? ReadInt16(int db, int startByteAdr);
        Task StartAsync(CancellationToken cancellation);
        void UpdatePlcSession();
    }
}